package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.PaymentMapper;
import com.example.shoppingmall.pojo.PayType;
import com.example.shoppingmall.pojo.Payment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaymentService {

    @Autowired
    PaymentMapper paymentMapper;

    //多条件查询+分页
    public List<Payment> payList(Integer bill_id, Integer third_id, String userPhone, Integer pageNo, Integer pageNum){
        return paymentMapper.payList(bill_id,third_id,userPhone,pageNo,pageNum);
    }

    //总条数
    public int total(Integer bill_id,Integer third_id,String userPhone){
        return paymentMapper.total(bill_id,third_id,userPhone);
    }

    //明细
    public Payment getPay(Integer bill_id){
        return paymentMapper.getPay(bill_id);
    }

    //支付状态List
    public List<PayType> getPayType(){
        return paymentMapper.getPayType();
    }

}
